const { Sequelize } = require("sequelize");
const {
  databaseName,
  account,
  passWord,
  otherConfig,
} = require("./config.database");

const sequelize = new Sequelize(databaseName, account, passWord, otherConfig);

// (async function testConnect() {
//   try {
//     await sequelize.authenticate();
//     console.log('连接数据库成功');
//   } catch (error) {
//     console.error('连接数据库失败：', error);
//   }
// }())
module.exports = sequelize;
